package com.example.my.agiftthat.MvpActivity;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
import android.webkit.WebResourceRequest;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.ImageView;

import com.example.my.agiftthat.R;
import com.example.my.agiftthat.config.Url;

/**
 * Created by My on 2016/12/21.
 */

public class ClickSearchActivitys extends AppCompatActivity {
    private WebView webView_click;
    private Intent intent = null;
//    private ImageView imageView_search;
    private int id;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_clicksearch);
        intent();
    }

    private void intent() {
        webView_click = (WebView) findViewById(R.id.webView_click);
//        imageView_search = (ImageView) findViewById(R.id.imageView_search);

        intent = getIntent();
        final String path = intent.getStringExtra("id");
        webView_click.loadUrl("http://www.cnblogs.com/alibaichuan/p/5863616.html");
        webView_click.getSettings().setJavaScriptEnabled(true);
        webView_click.setWebViewClient(new WebViewClient() {
            @Override
            public boolean shouldOverrideUrlLoading(WebView view, WebResourceRequest request) {
                view.loadUrl("http://www.cnblogs.com/alibaichuan/p/5863616.html");
                return true;
            }
        });
    }

    public void clickView(View view) {
        switch (view.getId()) {
            case R.id.imageView_search:
                onBackPressed();
                break;

        }
    }
}
